package com.microservice.salmon.db.entities;

import lombok.Getter;
import lombok.Setter;
import tk.mybatis.mapper.annotation.KeySql;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

@Table(name = "t_brands")
@Getter
@Setter
public class Brand {
    /**
     * 自增ID
     */
    @Id
    @Column(name = "brand_id")
    @KeySql(useGeneratedKeys = true)
    private Integer brandId;

    /**
     * 品牌名称
     */
    @Column(name = "brand_name")
    private String brandName;

    /**
     * 品牌图标
     */
    @Column(name = "brand_img")
    private String brandImg;

    /**
     * 有效状态 1:有效 0:无效
     */
    @Column(name = "data_flag")
    private Boolean dataFlag;

    /**
     * 排序号
     */
    @Column(name = "sort_no")
    private Integer sortNo;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 品牌介绍
     */
    @Column(name = "brand_desc")
    private String brandDesc;


    @Transient
    private List<GoodsCategory> categories;
}